package accounting_system;

import java.util.ArrayList;

public class Group extends PersonsList{
    private String name;
    private final ArrayList<Group> groupList = new ArrayList();

    public void setName(String n){
        name = n;
    }

    public String getName(){
        return name;
    }

    public void addGroup(Group group){
        groupList.add(group);
    }
    
    public void removeGroup(Group group){
        groupList.remove(group);
    }
    
    public ArrayList<Group> getGroupList(){
        return groupList;
    }
    
    public Group getGroup(int index){
        return groupList.get(index);
    }
    
    
}
